package com.shensi.api.admin.client.customer;

import com.shensi.api.admin.client.fallback.customer.CustomerCardUseRecordClientFallBack;
import com.shensi.api.admin.domian.customer.dto.CustomerCardUseRecordDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: budian
 * @since: 2023/11/30
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = CustomerCardUseRecordClientFallBack.class)
@Component
public interface CustomerCardUseRecordClient {


    /**
     * 查询客户电子会员卡充值消费记录列表
     */
    @GetMapping("/customer/record/list")
    public TableDataInfo list(@SpringQueryMap CustomerCardUseRecordDto form);

    /**
     * 查询客户电子会员卡充值消费记录列表
     */
    @GetMapping("/customer/record/phonelist")
    public TableDataInfo phonelist(@SpringQueryMap CustomerCardUseRecordDto customerCardUseRecord);

    /**
     * 查询客户充值/消费记录汇总
     */
    @GetMapping(value = "/customer/record/listCZXFData")
    public AjaxResult listCZXFData(@SpringQueryMap CustomerCardUseRecordDto customerCardUseRecord);

    /**
     * 查询客户充值/消费记录汇总 (包括已经退款的)
     */
    @GetMapping(value = "/customer/record/listAllCZXFData")
    public AjaxResult listAllCZXFData(@SpringQueryMap CustomerCardUseRecordDto customerCardUseRecord);

    /**
     * 导出客户电子会员卡充值消费记录列表
     */
    @GetMapping("/customer/record/export")
    public AjaxResult export(@SpringQueryMap CustomerCardUseRecordDto customerCardUseRecord);


    /**
     * 获取客户电子会员卡充值消费记录详细信息
     */
    @GetMapping(value = "/customer/record/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

    /**
     * 新增客户电子会员卡充值消费记录
     */
    @PostMapping("/customer/record")
    public AjaxResult add(@RequestBody CustomerCardUseRecordDto customerCardUseRecord);

    /**
     * 修改客户电子会员卡充值消费记录
     */
    @PutMapping("/customer/record")
    public AjaxResult edit(@RequestBody CustomerCardUseRecordDto customerCardUseRecord);

    /**
     * 删除客户电子会员卡充值消费记录
     */
    @DeleteMapping("/customer/record/{ids}")
    public AjaxResult remove(@PathVariable("ids") Long[] ids);
}
